package edu.gdcc.linearList;

/**
 * 单词逆序
 * 栈
 * Created by Administrator on 2017/1/3.
 */
class StackX {
    private int maxSize;
    private char[] stackArray;
    private int top;

    //------------------------------
    //constructor
    public StackX(int max) {
        maxSize = max;
        stackArray = new char[max];
        top = -1;
    }

    //------------------------------
    public void push(char j) {
        stackArray[++top] = j;
    }

    //-----------------------------
    public char pop() {
        return stackArray[top--];
    }

    //-----------------------------
    public char peek() {
        return stackArray[top];
    }

    //-----------------------------
    public boolean isEmpty() {
        return (top == -1);
    }
    //----------------------------

}

class Reverser {
    private String input;
    private String output;
    //----------------------------
    //constructor
    public Reverser(String in){
        input = in;
    }
    //----------------------------
    public String doRev(){
        int stackSize =
    }

}

public class ReverseWordApp {
}
